<html>
    <head>
    	<meta charset="utf-8" />
    	<title>jq css选择器</title>
    </head>
    <style type="text/css">
        p{height: 30px;}
    </style>
    <script src="js/jquery-1.12.3.min.js"></script>
    <script type="text/javascript">
        $(function  () {
        	$("p").css("background","gold");
        	$("p").css({"color":"#fff","width":"200px"}); //多个样式
            $("p:first").css("font-size","20px");
            $("input:not(':checked')").css("display","none");
            $("P:odd").css("background","red");
            $("P:even").css("background","#e6e6e6");
            $("tr:eq(1)").css("background","#e6e6e6");
            $("tr:gt(1)").css("background","#f00");
            $("tr:lt(1)").css("background","blue");
            $("tr:last").css("font-size","12px");
        })
    </script>
    <body>
    	<p>123</p>
        <p>456</P>
        <input value="123"/><br/>
        <input  value="456" checked="checked"/>

        <table>
          <tr><td>Header 1</td></tr>
          <tr><td>Value 1</td></tr>
          <tr><td>Value 2</td></tr>
        </table>
    </body>
</html>